﻿<navigation:Page x:Class="AppLab.Views.Publish" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:local="clr-namespace:AppLab"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:control="clr-namespace:AppLab.Controls"
           mc:Ignorable="d"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Style="{StaticResource PageStyle}">

    <Grid x:Name="LayoutRoot" >
        <Grid.Resources>
            <local:DateTimeConverter x:Key="DateConverter" />
            <local:BooleanToVisibilityConverter x:Key="VisibleConverter"/>
        </Grid.Resources>
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" >
            <toolkit:BusyIndicator x:Name="busyIndicatorLoad" Grid.RowSpan="2" BusyContent="{Binding Path=ApplicationStrings.BusyIndicatorLoad, Source={StaticResource ResourceWrapper}}">
                <toolkit:BusyIndicator x:Name="busyIndicator" BusyContent="{Binding Path=ApplicationStrings.BusyIndicatorRegisteringUser, Source={StaticResource ResourceWrapper}}"
                             IsBusy="{Binding IsBusy}">
                    <StackPanel x:Name="ContentStackPanel" Style="{StaticResource ContentStackPanelStyle}">
                        <!--<TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" 
                           Text="{Binding Path=ApplicationStrings.PublishPageTitle, Source={StaticResource ResourceWrapper}}"/>-->
                      
                            <StackPanel Orientation="Horizontal" Margin="10">
                                <TextBlock Text="{Binding Path=ApplicationStrings.InputMobileTypeOnTerminalInfo, Source={StaticResource ResourceWrapper}}" 
                                     Style="{StaticResource ContentTextStyle}"  />
                                <sdk:AutoCompleteBox Name="autoCompleteBoxMbBrand" Height="23" IsTextCompletionEnabled="True" HorizontalAlignment="Left" 
                                             Width="120" VerticalAlignment="Top" IsDropDownOpen="True" TabNavigation="Cycle"/>
                                <Button Name="SearchButton" Content="{Binding Path=ApplicationStrings.SearchButtonOnTerminalInfo, Source={StaticResource ResourceWrapper}}"
                                       Height="23" Click="SearchButton_Click" />
                            </StackPanel>
                            <!--<TextBlock x:Name="ContentText" Style="{StaticResource ContentTextStyle}"  VerticalAlignment="Center"  Margin="25,0,0,0" HorizontalAlignment="Left"
                           Text="{Binding Path=ApplicationStrings.PublishPageMessage, Source={StaticResource ResourceWrapper}}"/>-->
                       
                        <sdk:DataGrid Name="dataGridPublish"  Height="350"  AutoGenerateColumns="False" 
                                  IsReadOnly="True" GridLinesVisibility="Vertical" HorizontalAlignment="Left" 
                                   BorderThickness="2" BorderBrush="#FFCE6A6A" ColumnWidth="100" Margin="20,0,0,0"
                                  VerticalAlignment="Top" SelectionChanged="dataGridPublish_SelectionChanged" SelectionMode="Single">
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Header="品牌" Width="100" Binding="{Binding MobileBrand}"/>
                                <sdk:DataGridTextColumn Header="型号" Width="100" Binding="{Binding MobileType}"/>
                                <sdk:DataGridTextColumn Header="版本"  Width="100" Binding="{Binding MobileVersion}"/>
                                <sdk:DataGridTextColumn Header="验收人" Width="100" Binding="{Binding AssignedTo}"/>
                                <sdk:DataGridTextColumn Header="验收完成时间" Width="140" Binding="{Binding TestEndTime,StringFormat=yyyy-MM-dd HH:mm}" />
                                <sdk:DataGridTextColumn Header="版本状态" Width="140" Binding="{Binding ReleaseState}" />
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>

                        <Grid>
                            <sdk:DataPager Name="dpPulishInfo" VerticalAlignment="Top" IsTotalItemCountFixed="True" HorizontalAlignment="Left"  Source="{Binding ItemsSource, ElementName=dataGridPublish}" Margin="20,0,0,0" Grid.Row="1">
                            </sdk:DataPager>
                        </Grid>

                        <Grid>
                            <TextBlock Name="TipsForAdaptation" Height="20" VerticalAlignment="Top" Margin="20,10,0,0" FontSize="14" Foreground="Blue"></TextBlock>
                            <TextBlock Name="TipsForAdaptation2" Height="20" VerticalAlignment="Top" Margin="20,10,0,0" FontSize="14" Foreground="Red"></TextBlock>
                        </Grid>

                        <Grid Margin="30,10,0,0" Name="detailInfo" Visibility="{Binding ElementName=detailInfo,Path=IsHitTestVisible,Converter={StaticResource VisibleConverter}}">
                            <CheckBox Name="webCheck" Content="{Binding Path=ApplicationStrings.WebCheck, Source={StaticResource ResourceWrapper}}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Margin="0,0,0,0" Padding="4,-3,0,0"/>
                            <CheckBox Name="wapCheck" Content="{Binding Path=ApplicationStrings.WapCheck, Source={StaticResource ResourceWrapper}}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Margin="100,0,0,0" Padding="4,-3,0,0" />
                            <CheckBox Name="preloadedCheck" Content="{Binding Path=ApplicationStrings.PreloadedCheck, Source={StaticResource ResourceWrapper}}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Margin="200,0,0,0" Padding="4,-3,0,0"/>
                            <CheckBox Name="tysxSpaceCheck" Content="{Binding Path=ApplicationStrings.TysxSpaceCheck, Source={StaticResource ResourceWrapper}}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Margin="300,0,0,0" Padding="4,-3,0,0"/>
                            <CheckBox Name="tysxBoLuCheck" Content="{Binding Path=ApplicationStrings.TysxBoLuCheck, Source={StaticResource ResourceWrapper}}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Margin="400,0,0,0" Padding="4,-3,0,0"/>
                            <Button Content="发布" Name="buttonRelease" Width="80"  Height="27" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,40,0,0" Click="buttonRelease_Click" />
                        </Grid>
                    </StackPanel>
                </toolkit:BusyIndicator>
            </toolkit:BusyIndicator>
        </ScrollViewer>
    </Grid>
</navigation:Page>

